<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="reg.css">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="forget.css">
</head>
<body style="background-color: #f3f3f3">
<div id="zong">
    <div class="biaoti">忘记密码？</div>
    <div class="yanzheng">
        <div class="tishi">
            <ul>
                <li>请输入你的手机号或邮箱</li>
                <li>你将收到重置密码的信息，可以重新设置新的密码</li>
            </ul>
        </div>
        <div class="input">
            <div style="font-size: 14px">手机号或邮箱</div>
            <div><input  id="tel"/></div>
            <div class="error error1" id="error1"></div>
            <div id="resetbtn1">重置密码</div>
        </div>
    </div>
</div>
</body>
<script src="jquery-3.4.1.js"></script>
<script src="gong.js"></script>
<script>
    resetbtn1.onclick = function () {
        ajax("/bijiuser/checktel",
            {
                tel: tel.value
            },
            function (data) {
                error1.innerHTML = data ? "该号码未注册" : "";


                if(!data){
                    localStorage.forgetTel = tel.value;
                    location = "forget2.html";
                }
            }
        );

    };
</script>
</html>